package com.quwan.common.service.push;

import com.quwan.common.form.PushForm;
import com.quwan.common.result.PushDTO;
import com.quwan.config.yml.PushConfig;

public abstract class AbstractMessage {
    // 实现推送的对象
    MsgSender msgSender;

    public AbstractMessage(MsgSender msgSender){
        this.msgSender = msgSender;
    }

    public PushDTO sendAllMessage(PushForm pushForm, PushConfig pushConfig){
        return this.msgSender.pushAll(pushForm, pushConfig);
    }

    public PushDTO sendTokenMessage(PushForm pushForm, PushConfig pushConfig){
        return this.msgSender.pushToken(pushForm, pushConfig);
    }
}
